﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Diagnostics;
using System.Collections;

namespace FCNS.KeepMoneyLibrary.Data
{
    public class AccoutField
    {
        public static AccoutField GetAccountFieldByTag(string tag)
        {
            return new AccoutField(KMData.DataTableAccounts.Select("Tag = '" + tag + "'")[0]);
        }

        DataRow dRow = null;
        public AccoutField(DataRow row)
        {
            dRow = row;
        }

        public string Name
        {
            get { return (string)dRow["Name"]; }
            set
            {
                dRow["Name"] = value;
            }
        }

        public string Password
        {
            get { return (string)dRow["Password"]; }
            set
            {
                dRow["Password"] = value;
            }
        }
    }
}
